package cn.itsource.zkTest;

import org.I0Itec.zkclient.ZkClient;
import java.util.List;

public class ZKTest {

    public static void main(String[] args) {
        //1、创建客户端
        ZkClient zkClient = new ZkClient("127.0.0.1:2181", 5000);



        //获取某个节点的所有子节点
        List<String> children = zkClient.getChildren("/");
        for (String child : children) {
            System.out.println(child);  //zookeeper
        }
    }


}
